set thisListField to getaProp(getaProp(obj, #cast), #text)
set howMany to the number of lines in field thisListField
if thisLine = -1 then
return 0
else
if thisLine > howMany then
if line thisLine of field thisListField = EMPTY then
return 0
end if
end if
end if
set the foreColor of line thisLine of field thisListField to getIndex([8: 7, 16: 16912, 32: 8421504])
repeat while the stillDown
if (the mouseLine = -1) or not rollOver(theClickOn) then
set thisLine to the mouseLine
unselectList(thisListField)
next repeat
end if
if the mouseLine <> thisLine then
if the mouseLine <> -1 then
set thisLine to the mouseLine
end if
unselectList(thisListField)
set the foreColor of line thisLine of field thisListField to getIndex([8: 7, 16: 16912, 32: 8421504])
end if
end repeat
if (thisLine <> -1) and rollOver(theClickOn) then
objectPickListAction(ObjRef, thisLine, howMany)
else
return 0
end if
end
on unselectList
set the foreColor of field getaProp(getaProp(getaProp(gOBJECTS, #pickListText), #cast), #text) to getIndex([8: 255, 16: 0, 32: 0])
end
on objectPickListAction ObjRef, thisLine, howMany
set listCount to howMany - 1
if thisLine = 0 then
exit
end if
if thisLine = -1 then
exit
end if
if thisLine > listCount then
exit
end if
putObject(ObjRef, thisLine)
end
on putObject ObjRef, thisLine
put line thisLine of field getaProp(getaProp(getaProp(gOBJECTS, ObjRef), #cast), #text) into field getaProp(getaProp(getaProp(gOBJECTS, #SaveNameText), #cast), #text)